

CXX = g++
CXXFLAGS = -O2 -I./eigen-2.0.10/eigen/ --std=c++0x
LINK = $(CXX)
LINKFLAGS =

all :  ./source/moltool.o ./source/mdtool.o ./source/ffftool.o ./source/function.o ./source/inout.o ./source/control_io.o ./source/fit.o ./source/integrate.o  ./source/potential.o ./source/potential_eval.o ./source/potential_read.o ./source/structure.o ./source/structure_io.o
	$(LINK) $(LINKFLAGS) -o ./bin/moltool ./source/moltool.o 
	$(LINK) $(LINKFLAGS) -o ./bin/ffftool ./source/ffftool.o ./source/function.o ./source/inout.o  ./source/fit.o ./source/control_io.o ./source/potential.o ./source/potential_eval.o ./source/potential_read.o ./source/structure.o ./source/structure_io.o
	$(LINK) $(LINKFLAGS) -o ./bin/mdtool ./source/mdtool.o ./source/function.o ./source/inout.o  ./source/integrate.o  ./source/potential.o ./source/potential_eval.o ./source/potential_read.o ./source/structure.o ./source/structure_io.o

./source/mdtool.o: ./source/mdtool.cpp
	$(CXX) $(CXXFLAGS) -c ./source/mdtool.cpp -o ./source/mdtool.o
./source/ffftool.o: ./source/ffftool.cpp
	$(CXX) $(CXXFLAGS) -c ./source/ffftool.cpp -o ./source/ffftool.o
./source/moltool.o: ./source/moltool.cpp
	$(CXX) $(CXXFLAGS) -c ./source/moltool.cpp -o ./source/moltool.o    

./source/function.o: ./source/function.cpp
	$(CXX) $(CXXFLAGS) -c ./source/function.cpp -o ./source/function.o
./source/inout.o: ./source/inout.cpp
	$(CXX) $(CXXFLAGS) -c ./source/inout.cpp -o ./source/inout.o
./source/integrate.o: ./source/integrate.cpp
	$(CXX) $(CXXFLAGS) -c ./source/integrate.cpp -o ./source/integrate.o
./source/potential.o: ./source/potential.cpp
	$(CXX) $(CXXFLAGS) -c ./source/potential.cpp -o ./source/potential.o
./source/potential_eval.o: ./source/potential_eval.cpp
	$(CXX) $(CXXFLAGS) -c ./source/potential_eval.cpp -o ./source/potential_eval.o
./source/potential_read.o: ./source/potential_read.cpp
	$(CXX) $(CXXFLAGS) -c ./source/potential_read.cpp -o ./source/potential_read.o
./source/structure.o: ./source/structure.cpp
	$(CXX) $(CXXFLAGS) -c ./source/structure.cpp -o ./source/structure.o
./source/structure_io.o: ./source/structure_io.cpp
	$(CXX) $(CXXFLAGS) -c ./source/structure_io.cpp -o ./source/structure_io.o
./source/control_io.o: ./source/control_io.cpp
	$(CXX) $(CXXFLAGS) -c ./source/control_io.cpp -o ./source/control_io.o
./source/fit.o: ./source/fit.cpp
	$(CXX) $(CXXFLAGS) -c ./source/fit.cpp -o ./source/fit.o
    
    
.PHONY: clean

clean:
	rm ./source/*.o


 